#ifndef SHUI_ACTIONPOOL_H
#define SHUI_ACTIONPOOL_H

#include <QObject>
#include "tool/defines.h"

class QAction;
namespace ShUi
{

class ActionPoolImpl;
class ActionPool : public QObject
{
    Q_OBJECT
public:
    explicit ActionPool(QObject *parent = 0);
    ~ActionPool();

    QAction* action(const QString& name);
    void createActions();
    bool insertAction(QAction* action);
    bool removeAction(QAction* action);
    
signals:
    void commandIssued(const QString& command);
    
private slots:
    void onTriggered();
    
private:
    SH_DISABLE_COPY(ActionPool);
    SH_DECLARE_IMPL(ActionPool);
};

} // namespace ShUi

#endif // SHUI_ACTIONPOOL_H
